import java.util.Scanner;

/**
 * @Author: WangYongGan
 * @Date: 2021/10/31 9:37
 * @Description:
 */
public class Solution {
   public static int []nums = new int[(int) (Math.pow(10,7)+10)];
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("=====");
        int t = scanner.nextInt();
        t/=60;
        nums[0]=0;
        nums[1] = 1;
        nums[2] = 1;
        nums[3] = 1;
        for (int i = 4; i <=t; i++) {
            nums[i]=(nums[i-1]+nums[i-2]+nums[i-3])%425;
        }
        System.out.println(nums[t]);
    }
}
